package com.lab303.powerproject.repository;

import com.lab303.powerproject.entity.HistoryData;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface HistoryDataRepository extends JpaRepository<HistoryData,Integer> {

    @Query(nativeQuery = true,value = "SELECT history_data.* FROM history_data WHERE DATE_FORMAT(history_data.date,'%m-%d')=?1")
    List<HistoryData> findHistoryDataByDateTime(String MMdd);
}
